package com.gzx.plugin.data.wxjk.sync.dao;

import com.gzx.plugin.data.wxjk.sync.pojo.SssjCorporateAccount;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CorporateAccountConfigDao {


    @Insert("<script>" +
            "INSERT INTO data_wxjk_sssjCorporateAccount(" +
            "    business_id, " +
            "    account_name, " +
            "    bank_branch, " +
            "    account_no, " +
            "    create_time, " +
            "    update_time" +
            ") VALUES " +
            "<foreach collection='list' item='item' separator=','>" +
            "    (" +
            "        #{item.businessId}, " +
            "        #{item.accountName}, " +
            "        #{item.bankBranch}, " +
            "        #{item.accountNo}, " +
            "        NOW(), " +
            "        NOW()" +
            "    )" +
            "</foreach>" +
            "</script>")
    void batchSave(@Param("list") List<SssjCorporateAccount> list);
}
